package com.atguigu.gulimall.cart.service;

import com.atguigu.gulimall.cart.vo.Cart;
import com.atguigu.gulimall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author tianxinyu
 * @create 2020-12-23 9:42
 */
public interface CartService {
    //将商品 添加到购物车
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;
    //获取某个购物车中的购物项
    CartItem getCartItem(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    //清空购物车
    void clearCart(String cartkey);

    void checkItem(Long skuId, Integer check);

    void changeItemCount(Long skuId, Integer num);

    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();

}
